package com.demo.entity.enums;


public enum UserRoleTypeEnum {

    USER(0, "用户"),
    ADMIN(1, "管理员"),
    COUNSELOR(2,"咨询师");



    private Integer type;
    private String desc;

    UserRoleTypeEnum(Integer status, String desc) {
        this.type = status;
        this.desc = desc;
    }

    public static UserRoleTypeEnum getByType(Integer status) {
        for (UserRoleTypeEnum item : UserRoleTypeEnum.values()) {
            if (item.getType().equals(status)) {
                return item;
            }
        }
        return null;
    }

    public Integer getType() {
        return type;
    }

    public String getDesc() {
        return desc;
    }
}
